<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var a = 0;
      function fun() {
        if (a == 10) {
          return;
        }
        console.log(a);
        a++;

        arguments.callee();
        // fun = "123"; //防止函数中间改变，设置其他数据
        // fun();
      }
      fun();
    </script>
  </body>
</html>
